<template>
  <div class="list">
    <div class="main">
      <ul>
        <li @click="sendData(item.id)" v-for="item in list" :key="item.index">
          <a href="#">{{item.title}}</a>
          <span>{{item.createTime.slice(0,10)}}</span>
        </li>
      </ul>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      list: ""
    };
  },
  mounted() {},
  methods: {
    sendData(textId) {
      this.$emit("getSunData", textId);
    }
  }
};
</script>

<style lang="scss" scoped>
.list {
  .main {
    text-align: left;
    font-size: 16px;
    margin: 10px 20px;
    line-height: 22px;
    color: black;
    ul {
      li {
        font-size: 12px;
        height: 35px;
        line-height: 35px;
        border-bottom: 1px dashed #d7d7d7;
        padding-left: 13px;
        background: url("../assets/news-list02-icon.png") left center no-repeat;
        a:hover {
          color: rgb(230, 117, 38);
          text-decoration: underline;
        }
        span {
          color: #999;
          float: right;
        }
      }
    }
  }
}
</style>